<?xml version="1.0" ?>
<!--
This example illustrates how complex properties of
features may be referenced using XPath expressions.
Consider the feature type Person defined as: 
-->
<schema
   targetNamespace="http://www.someserver.com/myns"
   xmlns:myns="http://www.someserver.com/myns"
   xmlns:gml="http://www.opengis.net/gml/3.2"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
   xmlns="http://www.w3.org/2001/XMLSchema"
   elementFormDefault="qualified"
   version="1.0">
   <import namespace="http://www.opengis.net/gml/3.2"
           schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
   <element name="Person" type="myns:PersonType"
            substitutionGroup="gml:AbstractFeature"/>
   <complexType name="PersonType">
      <complexContent>
         <extension base="gml:AbstractFeatureType">
            <sequence>
               <element name="lastName" nillable="true">
                  <simpleType>
                     <restriction base="string">
                        <maxLength value="30"/>
                     </restriction>
                  </simpleType>
               </element>
               <element name="firstName" nillable="true">
                  <simpleType>
                     <restriction base="string">
                        <maxLength value="10"/>
                     </restriction>
                  </simpleType>
               </element>
               <element name="age" type="integer" nillable="true"/>
               <element name="sex" type="string"/>
               <element name="spouse">
                  <complexType>
                     <attribute name="SIN" type="xsd:anyURI" use="required" />
                  </complexType>
               </element>
               <element name="location" 
                        type="gml:PointPropertyType"
                        nillable="true"/>
               <element name="mailAddress" 
                        type="myns:AddressPropertyType" nillable="true"/>
               <element name="salary" type="positiveInteger" nillable="true"/>
            </sequence>
            <attribute name="SIN" type="xsd:anyURI" use="required"/>
         </extension>
      </complexContent>
   </complexType>
   <complexType name="AddressPropertyType">
      <sequence>
         <element name="Address" 
                  type="myns:AddressType" minOccurs="0" />
      </sequence>
   </complexType>
   <complexType name="AddressType">
      <sequence>
         <element name="streetName" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="30"/>
               </restriction>
            </simpleType>
         </element>
         <element name="streetNumber" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="10"/>
               </restriction>
            </simpleType>
         </element>
         <element name="city" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="30"/>
               </restriction>
            </simpleType>
         </element>
         <element name="province" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="30"/>
               </restriction>
            </simpleType>
         </element>
         <element name="postalCode" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="15"/>
               </restriction>
            </simpleType>
         </element>
         <element name="country" nillable="true">
            <simpleType>
               <restriction base="string">
                  <maxLength value="30"/>
               </restriction>
            </simpleType>
         </element>
      </sequence>
   </complexType>
</schema>
